@use './variables.scss' as *;
@use 'sass:color';

// Element Plus 主题定制
.el-button {
  border-radius: $border-radius-base;
  transition: all 0.3s ease;

  &--primary {
    background-color: $primary-color;
    border-color: $primary-color;
    
    &:hover,
    &:focus {
      background-color: color.adjust($primary-color, $lightness: 10%);
      border-color: color.adjust($primary-color, $lightness: 10%);
    }
    
    &:active {
      background-color: color.adjust($primary-color, $lightness: -10%);
      border-color: color.adjust($primary-color, $lightness: -10%);
    }
  }

  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  }
}

// 输入框样式
.el-input {
  .el-input__wrapper {
    border-radius: $border-radius-base;
    
    &:hover {
      border-color: $primary-color;
    }
    
    &.is-focus {
      border-color: $primary-color;
      box-shadow: 0 0 0 2px rgba(1, 156, 124, 0.2);
    }
  }
}

// 表格样式
.el-table {
  border-radius: $border-radius-base;
  overflow: hidden;
  
  .el-table__header {
    background-color: $background-color-base;
  }
  
  .el-table__row:hover > td {
    background-color: color.adjust($primary-color, $lightness: 45%);
  }
  
  th.el-table__cell {
    background-color: $background-color-base;
    color: $text-color-primary;
    font-weight: 500;
  }
}

// 卡片样式
.el-card {
  border-radius: $border-radius-base;
  box-shadow: $box-shadow-base;
  
  .el-card__header {
    font-weight: 500;
    color: $text-color-primary;
  }
}

// 菜单样式
.el-menu {
  .el-menu-item {
    &:hover {
      background-color: color.adjust($primary-color, $lightness: 45%);
      color: $primary-color;
    }
    
    &.is-active {
      background-color: color.adjust($primary-color, $lightness: 40%);
      color: $primary-color;
      font-weight: 500;
    }
  }
}

// 对话框样式
.el-dialog {
  border-radius: $border-radius-base;
  
  .el-dialog__header {
    padding: $spacing-medium $spacing-large;
  }
  
  .el-dialog__body {
    padding: $spacing-large;
  }
}